计算机科学与技术外文译文,计算机科学与技术外文翻译.doc

本文探讨了ActionScript中的数据类型,包括基本类别如原始类型和引用类型。详细介绍了字符串、数字、布尔值等原始数据类型,并提及这些类型在实际编程中的应用。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

计算机科学与技术外文翻译

毕业设计(论文)外文资料

原文及译文

专 业 计算机科学与技术

班 级

学 号 0810411504

姓 名 高芸芸

指 导 教 师 吴敏

原文出处:Flash 8 ActionScript Bible, Joey Lott and Robert Reinhardt, Published by Wiley Publishing, Inc.

Flash 8 ActionScript Bible

Joey Lott and Robert Reinhardt

Understanding Datatypes

When we talk about data, we’re talking about information or values. These values can be of many types. For example, even in a very simple movie you might still have a number, some text, and a MovieClip instance. All three of these examples are data of different types —what ActionScript calls datatypes.

Flash is actually capable of performing datatype conversions when necessary. However, this can lead to some poor coding practices on the part of ActionScript developers. For this reason, the ActionScript 2.0 standards require that you pay closer attention to the datatypes you are using.

In ActionScript, you’ll work with many different datatypes. However, for the sake of understanding how these datatypes work, you can consider them in two basic categories: primitive types and reference types. The primitive types are called primitive because they are the basic foundational datatypes, not because they lack importance. The reference datatypes are called reference types because they reference the primitive types.

Primitive datatypes include strings, numbers, Booleans, undefined, and null. We’ll examine each of these primitive datatypes a little more closely in this chapter. Reference datatypes are all objects, which is the subject of much of the rest of this book, so we’ll defer the majority of the discussion of reference datatypes to those later chapters.

Working with Strings

Strings are characters or words. String values must always be enclosed in either single quotes or double quotes. Here are a few examples of strings:

?a?

?b?

?1?

?Joey?

?123?

?abc?

?****?

Strings are used whenever you want to work with characters or words. For example, you can use

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值